package com.example.proxy.demo1;

import com.example.proxy.cgld_proxy.CglibProxyFactory;
import com.example.proxy.cgld_proxy.DemoService;
import com.example.proxy.demo1.impl.UserServerImpl;
import org.junit.Test;

import java.util.List;

public class Demo1 {


    @Test
    public void Test1(){

        IUserService demoService = new UserServerImpl();

        CglibProxyFactory factory = new CglibProxyFactory(demoService);
        IUserService logProxy = (IUserService) factory.getLogProxy(demoService);
        List<String> userList = logProxy.getUserList();
        System.out.println("userList = " + userList);
    }

}
